package com.newtouch.conf.demo;

import com.newtouch.conf.demo.task.NboConfDemoTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class NboConfDemoMain {
    protected static final Logger LOGGER = LoggerFactory.getLogger(NboConfDemoMain.class);

    private static String[] fn = null;

    // 初始化spring文档
    private static void contextInitialized() {
        fn = new String[] {"applicationContext.xml"};
    }

    //主方法
    public static void main(String[] args) throws Exception {

        contextInitialized();
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(fn);

        NboConfDemoTask task = ctx.getBean("nboConfDemoTask", NboConfDemoTask.class);

        int ret = task.run();

        System.exit(ret);
    }
}
